
using System;
namespace GameEngine.Navigation
{
	public struct Edge
	{
		public int A { get; private set; }
		public int B { get; private set; }

		public Edge(int a, int b) : this()
		{
			this.A = Convert.ToInt32(Math.Min(a, b));
			this.B = Convert.ToInt32(Math.Max(a, b));
		}

		public override int GetHashCode()
		{
			return A + B * 13;
		}

		public override bool Equals(object obj)
		{
			if (obj is Edge)
			{
				Edge otherEdge = (Edge)obj;
				return this.A == otherEdge.A && this.B == otherEdge.B;
			}
			return base.Equals(obj);
		}
	}
}
